import { lazy } from "react";
import { FriendsO, HomeO, Search, SettingO,LikeO,CartO } from '@react-vant/icons';
import {HOMETYPE} from "../types/router.d"
export const homePath:HOMETYPE[]=[
    {
        path:"/home/index",
        name:"Index",
        component:lazy(()=>import("../views/home/index/Index")),
        title:"首页",
        icon:HomeO,
    },
    {
        path:"/home/classify",
        name:"Classify",
        component:lazy(()=>import("../views/home/classify/Classify")),
        title:"分类",
        icon:SettingO,
    },
    {
        path:"/home/love",
        name:"Love",
        component:lazy(()=>import("../views/home/love/Love")),
        title:"京喜",
        icon:LikeO,
    },
    {
        path:"/home/shopcar",
        name:"Shopcar",
        component:lazy(()=>import("../views/home/shopcar/Shopcar")),
        title:"购物车",
        icon:CartO,
    },
    {
        path:"/home/my",
        name:"My",
        component:lazy(()=>import("../views/home/my/My")),
        title:"我的",
        icon:FriendsO,
    },
    {
        path:"/home",
        to:"/home/index"
    },
]
const routes=[
    {
        path:"/home",
        name:"Home",
        component:lazy(()=>import("../views/home/Home")),
        children:homePath
    },
    {
        path:"/login",
        name:"Login",
        component:lazy(()=>import("../views/login/Login")),
    },
    {
        path:"/detail/:id",
        name:"Detail",
        component:lazy(()=>import("../views/detail/Detail")),
    },
    {
        path:"/address",
        name:"Address",
        component:lazy(()=>import("../views/address/Address")),
    },
    {
        path:"/addaddress",
        name:"Addaddress",
        component:lazy(()=>import("../views/address/Addaddress")),
    },
    {
        path:"/editaddress",
        name:"Editaddress",
        component:lazy(()=>import("../views/address/Editaddress")),
    },
    {
        path:"/",
        to:"/home"
    },
]
export default routes;